package com.powernode.springmvc.controller;

import jakarta.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class SessionScopeTestController {
    @RequestMapping("/testSessionScope")
    public String testServletAPI(HttpSession session) {
        // 向会话域中存储数据
        session.setAttribute("testSessionScope", "使用原生Servlet API实现session域共享数据");
        return "ok";
    }
}
